home *** CD-ROM | disk | FTP | other *** search
/ Sports Illustrated for Kids - Awesome Athletes! / Sports Illustrated for Kids - Awesome Athletes!.iso / th.dir / 00006_Misc VR.ls < prev    next >
Encoding:
Text File  |  1996-04-18  |  3.0 KB  |  128 lines

  1. global gTHRefresh
  2.  
  3. on adjustVRPos aHAdjust, aVAdjust, aZAdjust
  4.   set vHPan to float(PanoGetHPanAngle()) + aHAdjust
  5.   set vVPan to float(PanoGetVPanAngle()) + aVAdjust
  6.   set vZoom to float(PanoGetZoomAngle()) + aZAdjust
  7.   SetPanoMovieView(string(vHPan), string(vVPan), string(vZoom))
  8. end
  9.  
  10. on setVRSize aNormal, checkIt
  11.   global gPanoMovieObj, gTHNormalSize
  12.   if voidp(checkIt) then
  13.     set checkIt to 1
  14.   end if
  15.   if checkIt then
  16.     if aNormal = gTHNormalSize then
  17.       return 
  18.     end if
  19.   end if
  20.   set vH to PanoGetHPanAngle()
  21.   set vV to PanoGetVPanAngle()
  22.   set vZ to PanoGetZoomAngle()
  23.   set gTHNormalSize to aNormal
  24.   VRNormalSize(gTHNormalSize)
  25.   SetPanoMovieView(vH, vV, vZ)
  26.   ShowPanoMovie(0)
  27.   set gTHRefresh to 1
  28. end
  29.  
  30. on VRNormalSize aFlag
  31.   global gTHVRPath, cTHVRChannel, gPanoMovieObj, cTHBigCheckSprite, cTHBiggerCheckSprite, cTHBigSprite, cTHBiggerSprite
  32.   ClosePanoMovie()
  33.   if aFlag then
  34.     set cTHVRChannel to 44
  35.     OpenPanoMovie(gTHVRPath & "th.mov", cTHVRChannel, 0)
  36.     set the visible of sprite cTHBigCheckSprite to 1
  37.     set the visible of sprite cTHBiggerCheckSprite to 0
  38.     set the visible of sprite 2 to 0
  39.     updateStage()
  40.   else
  41.     set cTHVRChannel to 43
  42.     OpenPanoMovie(gTHVRPath & "th2.mov", cTHVRChannel, 0)
  43.     set the visible of sprite cTHBigCheckSprite to 0
  44.     set the visible of sprite cTHBiggerCheckSprite to 1
  45.     set the visible of sprite 2 to 1
  46.     updateStage()
  47.   end if
  48. end
  49.  
  50. on spinVR aTimes
  51.   repeat with vI = 1 to aTimes
  52.     adjustVRPos(10, 0, 0)
  53.   end repeat
  54. end
  55.  
  56. on inOutVR aTimes
  57. end
  58.  
  59. on warpVR aTimes
  60. end
  61.  
  62. on hitHotspot pHotSpotID
  63.   global gTHHotspot
  64.   set vInfo to getaProp(gTHLocation, pHotSpotID)
  65.   if not voidp(vInfo) then
  66.     set vDest to getAt(vInfo, 2)
  67.     put vDest
  68.     if char 1 of vDest = "-" then
  69.       specialLocation(vDest)
  70.     else
  71.       playDestSound(vDest)
  72.       navGoTo(vDest)
  73.     end if
  74.   end if
  75. end
  76.  
  77. on rolloverHandler pHotSpotID
  78.   global gTHHotspot
  79.   put pHotSpotID
  80.   set vInfo to getaProp(gTHLocation, pHotSpotID)
  81.   if not voidp(vInfo) then
  82.     set vCast to getAt(vInfo, 1)
  83.     if vCast = EMPTY then
  84.       set vCast to "BLANK-LABEL"
  85.     end if
  86.     puppetSprite(20, 1)
  87.     set the castNum of sprite 20 to the number of cast vCast
  88.     updateStage()
  89.   end if
  90. end
  91.  
  92. on playDestSound aDest
  93.   if aDest = "sd" then
  94.     puppetSound("SuPrize")
  95.   end if
  96.   updateStage()
  97. end
  98.  
  99. factory thCallbacks
  100. method thMouseOverHandler
  101.   global gPanoMovieObj
  102.   put "Mouse over panoramic movie"
  103.   if objectp(gPanoMovieObj) then
  104.   end if
  105.  
  106. method thRolloverHandler pHotSpotID
  107.   rolloverHandler(pHotSpotID)
  108.  
  109. method thMouseDownHandler
  110.   global gPanoMovieObj
  111.   put "Mouse down during mMouseOver call"
  112.   if objectp(gPanoMovieObj) then
  113.     gPanoMovieObj(mPassMouseDown)
  114.   end if
  115.  
  116. method thPanZoomStartHandler
  117.   put "About to pan or zoom in panoramic movie"
  118.  
  119. method thMouseStillDownHandler
  120.   global gPanoMovieObj
  121.   put "Enter mouse still down from panoramic movie"
  122.   if objectp(gPanoMovieObj) then
  123.   end if
  124.   put "Leave mouse still down from panoramic movie"
  125.  
  126. method thNodeLeaveHandler pToNode
  127.   put "Jumping to node " & pToNode & " in panoramic movie"
  128.